#template('colorThemeInit.vm')
.xnotification-container {
  position : fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  text-align: center;
  z-index: 10051; /* One more than the z-index of bootstrap's modal. */
  display: block !important;
  max-width: 80%;
}
.xnotification-wrapper {
  padding-top: 1px;
}
.xnotification {
  cursor: pointer;
  display: inline-block;
  background: #333 2px center no-repeat;
  border: none;
  padding: 8px 15px;
  border-radius: 7px;
  color: #fff;
  line-height: 20px;
  margin-bottom: 10px;
}

#set($notificationCustommization = [])
/* each element specifies [notification type, bg color, text color, icon] */
#set($discard = $notificationCustommization.add(['info', "$theme.notificationInfoColor", '#fff']))
#set($discard = $notificationCustommization.add(['warning', "$theme.notificationWarningColor ", '#330']))
#set($discard = $notificationCustommization.add(['error', "$theme.notificationErrorColor", '#fff']))
#set($discard = $notificationCustommization.add(['inprogress', '#333', '#fff', 'icons/xwiki/spinner-white.gif']))
#set($discard = $notificationCustommization.add(['done', "$theme.notificationSuccessColor", '#fff']))
#foreach($item in $notificationCustommization)
  #set($notificationType  = $item.get(0))
  #set($bgColor = $item.get(1))
  #set($textColor = $item.get(2))
  #set($imgUrl = '')
  #if ($item.size() >= 4)
    #set($imgName = "$!item.get(3)")
    #if($imgName.indexOf("/") >= 0)
      #set($imgUrl = $xwiki.getSkinFile($imgName))
    #else
      #set($imgExtension = '.png')
      #set($imgUrl = $xwiki.getSkinFile("icons/silk/$imgName$imgExtension"))
    #end
  #end
/** $notificationType */
.xnotification-${notificationType} {
  background-color: $bgColor;
  color:  $textColor;
  border-color:  $textColor;
#if($imgUrl != '')
  background-image: url($imgUrl);
  padding-left: 38px;
  background-position: 14px;
#end
}
#end

@media (min-width: 992px) { /* should be: @screen-md-min */
  .xnotification-container {
    max-width: 40%;
  }
}
